package com.dao.front.Impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.dao.BaseDao;
import com.dao.front.SingerFrontQueryDao;
import com.entity.Query.SingerQuery;

@Repository
public class SingerFrontQueryDaoImpl extends BaseDao implements SingerFrontQueryDao{

	@Override
	public List<Map<String, Object>> querySingerName(SingerQuery singerQuery) {
		String sql ="select si.singerName,mu.musicId,mu.musicName,mu.musicMp3,sp.specialName,mu.timeLength,si.singerId,sp.specialId "
				+ " from singer as si "
				+ " join music as mu on si.singerId=mu.singerId "
				+ " join special as sp on mu.specialId=sp.specialId"
				+ " where si.singerName like ?";
		Object[] params={singerQuery.getSingerName()};
		return executeQuery(sql, params);
	}

}
